﻿@{
    Layout = null;

    var tableName = PageViewModel.PageTableID(this);

    var detail_dialog_show = PageViewModel.PageFunctionName(this, "detail_dialog_show");
    var detailDlgName = PageViewModel.PageEditDialog(this);
}
<div style="height:100%">
    
    <script type="text/javascript">
        function @detail_dialog_show (id) {
            var dlg = $dlg('@detailDlgName');
            dlg.dialog({
                title: '查看日志', width: 800, height: 500,
                closed: false, cache: false, modal: true, maximizable: true, resizable: true,
                href: '~/Systems/_ShowSystemLogs/' + id,
                onResize: function () {
                    $(this).dialog('center');
                }
            });
        }
    </script>

    <table id="@tableName" class="easyui-datagrid" style="width:100%;" rownumbers="true" fitColumns="true" fit="true"
           pagination="true" pageSize="@SystemSettingService.Instance.PageSize" pageList="@SystemSettingService.Instance.PageList"
           data-options="striped:true,border:false,singleSelect:true,url:'~/Systems/GetSystemLogs',method:'get'">
        <thead>
            <tr>
                <th data-options="field:'LogTime',width:120,align:'center',formatter:$.DateTimeFmt">时间</th>
                <th data-options="field:'LogSource',width:100">来源</th>
                <th data-options="field:'Model',width:100">模块</th>
                <th data-options="field:'LogMessage',width:200,formatter:function(v,r,i){
                    return '&lt;a href=\'javascript:@detail_dialog_show ('+r.Id+')\'&gt;'+v+'&lt;/a&gt;';
                }">摘要</th>
                <th data-options="field:'Client',width:100">操作人</th>
                <th data-options="field:'RemoteIP',width:100">IP地址</th>
            </tr>
        </thead>
    </table>

</div>